﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title></title>
	</head>
	<body>
	<strong>Lua Scripting</strong>
<p>With Shion you can write Basic Scripts using are built in Lua Scripting Engine.</p>
<p style="border: dotted 1 black;">NOTE: Unless you installed the Shion 6 Lua Hook, these funtions do not work</p>
<strong>Varibles for OnCommands</strong>
<p>
raw - Contains the raw IRC Information<br />
nick - Contains nick of sender<br />
channel - Contains channel where message was sent<br />
server - Contains server message was sent<br />
</p>
<strong>Commands</strong>
<p>
Shion_SHA1(string text)<br />
Shion_MessageBox(string message)<br />
Shion_OnHook(string onString, string function)<br />
Shion_DeHook(string onString)<br />
Shion_SendMessage(string server, string channel, string message)<br />
Shion_Echo(string server, string message)<br />
Shion_SendRaw(string server, string raw)<br />
</p>

<strong>Sample Script</strong>
<p>
<code>
function on_load()<br />
	Shion_OnHook("TEXT:^test(.*)", "testinghook")<br />
end<br />
<br />
function on_unload()<br />
	Shion_DeHook("TEXT:^test(.*)")<br />
end<br />
<br />
function testinghook()<br />
	Shion_SendMessage(server, channel, "Return Value for hook TEXT:^test(.*)")<br />
end<br />
</code>
</p>
<strong>To Load and Unload Scripts</strong>
<p>To load a script its /exe loadluascript &lt;Script Name&gt; &lt;Path to Script&gt;<br />
To unload a script its /exe unloadluascript &lt;Script Name&gt;</p>
	</body>
</html>